import Vue from 'vue'
import index from '@/components/index';
import index1 from '@/components/index1';
import indexManage from "@/components/indexManage";

import Router from 'vue-router'
import home from '@/components/home';
import about from "@/components/about";
import careers from "@/components/careers";
import contact from "@/components/contact";
import event from "@/components/event";
import management from "@/components/management";
import visitor from "@/components/visitor";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: index,
      redirect:'/home',
      children:[{
        path:'/home',
        component:home
      }]
    },
    {
      path: '/about',
      name: 'about',
      component: index,
      redirect:'/about',
      children:[{
        path:'/about',
        component:about
      }]
    },
    {
      path: '/careers',
      name: 'careers',
      component: index,
      redirect:'/careers',
      children:[{
        path:'/careers',
        component:careers
      }]
    },
    {
      path: '/contact',
      name: 'contact',
      component: index,
      redirect:'/contact',
      children:[{
        path:'/contact',
        component:contact
      }]
    },
    {
      path: '/event',
      name: 'event',
      component: index,
      redirect:'/event',
      children:[{
        path:'/event',
        component:event
      }]
    },
    //Management
    {
      path: '/supplier',
      name: 'supplier',
      component: indexManage,
      redirect:'/supplier',
      children:[{
        path:'/supplier',
        component:management
      }]
    },
    //visitor
    {
      path: '/visitor',
      name: 'visitor',
      component: index,
      redirect:'/visitor',
      children:[{
        path:'/visitor',
        component:visitor
      }]
    },
  ]
})
